package design.Mediator;

/**
 * Created by looper on 2017/8/28.
 */
public class ProductDepartment extends Department {
  public ProductDepartment(String name, Mediator mediator) {
    super(name, mediator);
  }

  //接收其他部门的消息
  @Override
  public void getMessage(String message) {
    System.out.println("产品部刚刚收到消息 : "+message);
  }

  //向其他部门发送信息
  public void sendMessage(ProductDepartment productDepartment,String message) {
    mediator.contact(productDepartment,message);
  }

}